﻿using System;

namespace Commands.Scheduling
{
    public interface ISchedule
    {
        TimeSpan CheckInterval { get; set; }
        TimeSpan TimeToSuspend { get; set; }

        DateTime GetWakeupTime(DateTime suspendTme);

        event Action CheckSettingsChanged;
        event Action SuspendSettingsChanged;

        bool AutoCheckEnabled { get; set; }
        bool SuspendEnabled { get; set; }
        bool CheckAtStart { get; set; }

        bool SuspendOnlyOnInactive { get; set; }

        bool CanBeSuspendedNow();

        /// <summary>
        /// Time at which next check will occur.
        /// </summary>
        DateTime NextCheckTime { get; set; }

        /// <summary>
        /// Time at which next suspend will occur.
        /// </summary>
        DateTime SuspendTime { get; set; }
    }
}
